home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / gnome-codec-install.prerm < prev    next >
Text File  |  2009-10-20  |  1KB  |  56 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ] ; then
  6.     update-alternatives --remove gstreamer-codec-install /usr/bin/gnome-codec-install
  7. fi
  8.  
  9. # Automatically added by dh_pycentral
  10. case "$1" in remove|upgrade)
  11.     pkgremove=y
  12. esac
  13. if [ -f /var/lib/pycentral/gnome-codec-install.pkgremove ] || [ -f /var/lib/pycentral/pkgremove ]; then
  14.     pkgremove=y
  15. fi
  16. if [ "$pkgremove" = y ]; then
  17. if which python >/dev/null 2>&1 && which pycentral >/dev/null 2>&1; then
  18.     pycentral pkgremove gnome-codec-install
  19. else
  20.     flist=$(tempfile)
  21.     slist=$(tempfile)
  22.     dpkg -L gnome-codec-install | tee $flist | \
  23.     while read n; do
  24.       case "$n" in
  25.         /usr/share/pyshared/*)
  26.           n2=${n#/usr/share/pyshared/*}
  27.           case "$n" in
  28.         *.py) echo "p $n";;
  29.         *) [ -d "$n" ] && echo "d $n2" || echo "f $n2"
  30.           esac
  31.           ;;
  32.         *) continue
  33.       esac
  34.     done > $slist
  35.     if [ -s $slist ]; then
  36.         for d in /usr/lib/python[0-9].[0-9]/????-packages; do
  37.         case "$d" in */python2.1/*|*/python2.2/*) continue; esac
  38.         while read t n; do
  39.             case "$t" in
  40.             p) rm -f $d/$n $d/${n}[co];;
  41.             d) rmdir $d/$n 2>/dev/null || true;;
  42.             *) rm -f $d/$n
  43.             esac
  44.         done < $slist
  45.         done
  46.     fi
  47.         awk '/\/usr\/share\/pyshared/ {next} /\.py$/ {print $0"c\n" $0"o"}' $flist \
  48.         | xargs -r rm -f >&2
  49.     rm -f $flist $slist
  50. fi
  51. rm -f /var/lib/pycentral/gnome-codec-install.pkgremove
  52. fi
  53. # End automatically added section
  54.  
  55.  
  56.